// Package repository
// @Author zhongxc
// @Date 2024/7/3 10:55:00
// @Desc
package repository

import (
	"context"
	"vben-admin/pkg/model"
)

type DepartmentRepo interface {
	GetDepartmentList(ctx context.Context, name string, status int32) ([]*model.DepartmentModel, error)
	GetDepartmentById(ctx context.Context, departmentId int64) (*model.DepartmentModel, error)
	GetDepartmentByName(ctx context.Context, name string) (*model.DepartmentModel, error)
	Create(ctx context.Context, department *model.DepartmentModel) error
	UpdateById(ctx context.Context, id int64, department map[string]interface{}) error
	DeleteById(ctx context.Context, id int64) error
	CheckDeptHasChild(ctx context.Context, id int64) (*model.DepartmentModel, error)
}
